//
//  TransmitViewController.swift
//  NSinaWeibo
//
//  Created by LoliQueen on 16/2/23.
//  Copyright © 2016年 LoliQueen. All rights reserved.
//

import UIKit

class TransmitViewController: UIViewController {

    ///手写代码的控制器和视图 默认背景色是clearColor 设置为白色，不会出现卡顿
    override func viewDidLoad() {
        view.backgroundColor = UIColor.whiteColor()
        
        //设置导航条右按钮
        navigationItem.rightBarButtonItem = UIBarButtonItem(title: "发表", style: .Plain, target: self, action: "push")
        
        //自定义左按钮
//        let btn :UIButton = UIButton(backImageName: nil, title: "返回", textColor: themeColor, imageName: "navigationbar_back_withtext", fontSize: 14)
//        ///自定义按钮就要自定义对应的点击事件
//        btn.addTarget(self, action: "back", forControlEvents: .TouchUpInside)
//        
//        navigationItem.leftBarButtonItem = UIBarButtonItem(customView: btn)
        
    }
    
//    @objc private func back(){
//        navigationController?.popViewControllerAnimated(true)   
//    }
//    
    //发表微博，返回页面
   @objc private func push(){
        let homeVC = HomeTableViewController()
        navigationController?.pushViewController(homeVC, animated: true)
    }
    

}
